import { Switch, Route } from "react-router-dom";
import routes from "./router.config";

export default () => {
    return (
        <Switch>
            {routes.map((item, index) => {
                return (
                    <Route
                        key={index}
                        path={item.path}
                        exact
                        render={(props) => {
                            return item.render(props);
                        }}
                    />
                );
            })}
        </Switch>
    );
};
